package cn.tx.service.impl;

import cn.tx.dao.SongerMapper;
import cn.tx.model.Songer;
import cn.tx.service.SongerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Snake Eyes
 * @PROJECT_NAME: hani_parent
 * @DESCRIPTION:
 * @USER: 11647
 * @DATE: 2021/5/31 16:43
 * @Email: 1164763541@qq.com
 */
@Service
public class SongerServiceImpl implements SongerService {
    @Autowired
    private SongerMapper songerMapper;

    @Override
    public void addSonger(Songer songer) {
        songerMapper.insert(songer);
    }

    @Override
    public Songer getSongerById(int songId) {
        return songerMapper.selectByPrimaryKey(songId);
    }

    @Override
    public void updateSonger(Songer songer) {
        songerMapper.updateByPrimaryKey(songer);
    }

    @Override
    public void delSongerById(int songId) {
        songerMapper.deleteByPrimaryKey(songId);
    }
}
